/* 开云支付重新设计样式 */
.chat-room-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f5f5;
}

/* 顶部客服栏 */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1890ff;
  color: white;
  padding: 12px 16px;
  height: 60px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-left {
  display: flex;
  align-items: center;
}

.service-avatar {
  margin-right: 12px;
  
  // 覆盖组件默认样式，适配头部
  &.avatar-large {
    width: 36px;
    height: 36px;
    
    img {
      width: 36px;
      height: 36px;
      border: 2px solid white;
    }
  }
}

.service-name {
  font-size: 16px;
  font-weight: 500;
}

.exit-btn {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.exit-btn:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 主聊天区域 */
.chat-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 左侧聊天内容 */
.chat-content {
  flex: 1;
  background-color: white;
  position: relative;
}

/* 右侧常见问题 */
.common-questions {
  width: 200px;
  background-color: white;
  border-left: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
}

.questions-header {
  padding: 16px;
  border-bottom: 1px solid #e8e8e8;
  background-color: #fafafa;
}

.questions-header h3 {
  margin: 0;
  font-size: 14px;
  color: #1890ff;
  font-weight: 500;
  border-bottom: 2px solid #1890ff;
  padding-bottom: 8px;
}

.questions-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.question-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: background-color 0.3s;
  border-bottom: 1px solid #f0f0f0;
}

.question-item:hover {
  background-color: #f5f5f5;
  color: #1890ff;
}

/* 消息样式 */
.mscroll-container {
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

.chat-item {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
}

/* 用户消息 */
.user-message {
  justify-content: flex-end;
}

.user-bubble {
  background-color: #1890ff;
  color: white;
  padding: 10px 14px;
  border-radius: 18px 18px 4px 18px;
  max-width: 70%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
  margin-right: 8px;
}

.user-avatar {
  flex-shrink: 0;
  
  // 覆盖组件默认样式
  &.avatar-medium {
    width: 32px;
    height: 32px;
    
    img {
      width: 32px;
      height: 32px;
    }
  }
}

/* 客服消息 */
.service-message {
  justify-content: flex-start;
}

.service-avatar-small {
  margin-right: 8px;
  flex-shrink: 0;
  
  // 覆盖组件默认样式
  &.avatar-medium {
    width: 32px;
    height: 32px;
    
    img {
      width: 32px;
      height: 32px;
    }
  }
}

.service-bubble {
  background-color: #f0f0f0;
  color: #333;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  max-width: 70%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

/* 系统消息 */
.system-message {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.system-bubble {
  background-color: #f0f0f0;
  color: #999;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  text-align: center;
}

/* 时间显示 */
.format_time {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 16px 0;
}

.format_recall {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin: 8px 0;
}

/* 底部输入区域 */
.chat-input-area {
  background-color: white;
  border-top: 1px solid #e8e8e8;
  padding: 12px 16px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-input {
  flex: 1;
  border: 1px solid #d9d9d9;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.message-input:focus {
  border-color: #1890ff;
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.action-btn:hover {
  background-color: #f5f5f5;
}

.send-btn {
  background-color: #1890ff;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.3s;
}

.send-btn:hover:not(:disabled) {
  background-color: #40a9ff;
}

.send-btn:disabled {
  background-color: #d9d9d9;
  cursor: not-allowed;
}

/* 底部版权信息 */
.footer-info {
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: #999;
  background-color: #fafafa;
  border-top: 1px solid #e8e8e8;
}

/* 语音相关样式 */
.vioce_start {
  height: 20px;
  width: 20px;
  vertical-align: middle;
}

.vioce_stop_left, .vioce_stop_right {
  background: url('../../assets/img/spriteImg.png') no-repeat;
  background-position: -465px -398px;
  background-size: 487px 462px;
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin: 0 4px;
}

.vioce_stop_right {
  background-position: -200px -433px;
}

.vioce_second {
  font-size: 12px;
  vertical-align: middle;
}

/* 录音相关 */
.recording {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  z-index: 1000;
}

/* 更多信息 */
.more_info {
  text-align: center;
  padding: 16px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.primary_color {
  color: #1890ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .common-questions {
    display: none;
  }
  
  .chat-main {
    flex-direction: column;
  }
  
  .chat-content {
    flex: 1;
  }
}

/* 原有样式保留 */
.mescroll {
  position: relative;
  height: 100%;
  width: 100%;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  list-style: none;
}

/* 表情和功能面板 */
.yd-grids-group {
  background-color: white;
  border-top: 1px solid #e8e8e8;
}

.yd-grids-item {
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

.yd-grids-item:hover {
  background-color: #f5f5f5;
}

/* 文件下载样式 */
.rawMsg a {
  color: #1890ff;
  text-decoration: none;
}

.rawMsg a:hover {
  text-decoration: underline;
}

/* 兼容原有组件样式 */
.voice {
  display: flex;
  flex-direction: column-reverse;
  padding: 0.2rem;
  vertical-align: middle;
}

.input {
  max-height: 100px;
  line-height: 24px;
  font-size: 20px;
  padding: 5px 8px;
  border-bottom: 1px solid #00C2E6;
  overflow-x: auto;
  margin-bottom: 5px;
  vertical-align: middle;
}

.input:empty::before {
  content: attr(placeholder);
}

.touched {
  background: #999999;
  color: #fff;
}

.def {
  display: flex;
  flex-direction: column-reverse;
  text-align: center;
  padding: 0.2rem;
  vertical-align: middle;
}

.swiper-wrapper {
  height: 200px !important;
}

.defs_wrapper {
  height: 200px !important;
  width: 100%;
  border-top: 1px solid #e9e9e9;
  text-align: left;
  overflow-x: auto;
  background: #fff;
  flex-wrap: wrap;
  position: fixed;
  bottom: 0rem;
  text-align: center;
}

.yd-grids-item:after {
  border-bottom: 0px;
}

.yd-grids-4 .yd-grids-item:not(:nth-child(4n)):before {
  border-right: 0px;
}

.mscroll-container {
  font-size: 0.5rem;
  position: relative;
}

/* 聊天 */
ul {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  width: 100%;
}

.mscroll-container ul li {
  padding: 20px 0px 0px 0px;
}

li {
  display: list-item;
  text-align: -webkit-match-parent;
}

.chat-item {
  width: 100%;
  margin: 14px 0;
}

.chat-item .otherchat {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.chat-item .otherchat .img {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  position: absolute;
  top: 0%;
  left: 4px;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  cursor: pointer;
}

.chat-item .otherchat .nt {
  font-size: 12px;
  left: 50px;
  top: -26px;
  position: absolute;
  color: #686868;
}

.chat-item .otherchat .nt span {
  padding-right: .3rem;
}

.chat-item .otherchat .nt span:nth-child(2) {
  font-size: 12px;
}

.chat-item .otherchat .msg {
  min-height: 21px;
  max-width: 60% !important;
  margin-left: 50px;
  padding: 6px;
  border-radius: 8px;
  font-size: 14px;
  background-color: #fff;
}

.chat-item .otherchat .rawMsg {
  min-height: 21px;
  max-width: 60% !important;
  margin-left: 45px;
  padding: 6px;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fff;
  position: relative;
  top: 5px;
  word-wrap: break-word;
}

.otherchat .rawMsg::before {
  content: "";
  width: 0;
  height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  border-width: 10px;
  border-style: solid dashed dashed dashed;
  border-color: transparent transparent #fff transparent;
  position: absolute;
  top: -15px;
  left: 0px;
}

/* my */
.chat-item .mychat {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.chat-item .mychat .img {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  position: absolute;
  top: 0%;
  right: 4px;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
}

.chat-item .mychat .nt {
  font-size: 12px;
  right: 50px;
  top: -26px;
  position: absolute;
  color: #686868;
}

.chat-item .mychat .msg {
  max-width: 60%;
  margin-right: 50px;
  padding: 6px;
  border-radius: 8px;
  font-size: 14px;
  background-color: #89d961;
  color: #fff;
  word-wrap: break-word;
}

.chat-item .mychat .rawMsg {
  max-width: 60%;
  margin-right: 50px;
  padding: 6px;
  border-radius: 8px;
  font-size: 16px;
  background-color: #89d961;
  color: #fff;
  word-wrap: break-word;
  position: relative;
  top: 5px;
}

.mychat .rawMsg::before {
  content: "";
  width: 0;
  height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  border-width: 10px;
  border-style: solid dashed dashed dashed;
  border-color: transparent transparent #89d961 transparent;
  position: absolute;
  top: -15px;
  right: 0px;
}

/* 声音 */
.Rotate {
  transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
  -o-transform: rotate(180deg);
}

.chat_right {
  height: 23px;
  width: 23px;
}

/* 兼容原有组件 */
.yd-grids-raw {
  overflow: hidden;
  position: relative;
  background-color: #fff;
}

.yd-grids-raw .yd-grids-item {
  width: 25%;
}

.yd-grids-item-raw {
  width: 25%;
  float: left;
  position: relative;
  z-index: 0;
  padding: .35rem 0;
  font-size: .28rem;
}

.yd-grids-icon {
  height: .68rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.yd-grids-txt {
  word-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
  color: #333;
  padding: 0 .2rem;
}

.send_status {
  float: right;
  max-width: 60%;
  border-radius: 8px;
  font-size: 14px;
  word-wrap: break-word;
  position: relative;
  top: 5px;
  margin-right: 5px;
}

.rotate_loading {
  -webkit-animation: rotate .8s linear infinite;
}

@-webkit-keyframes rotate {
  0% { -webkit-transform: rotate(0deg); }
  25% { -webkit-transform: rotate(90deg); }
  50% { -webkit-transform: rotate(180deg); }
  75% { -webkit-transform: rotate(270deg); }
  100% { -webkit-transform: rotate(360deg); }
}

.read_status {
  float: right;
  max-width: 60%;
  border-radius: 8px;
  font-size: 14px;
  word-wrap: break-word;
  position: relative;
  top: 3px;
  min-height: 21px;
  padding: 6px;
}

.activeaddress-book {
  color: red !important;
}

dl {
  background-color: #fff;
}

.address-book-list {
  margin-bottom: 0px;
  font-size: 12px;
  position: fixed;
  z-index: 5;
  width: 100%;
  overflow: auto;
  height: 100%;
  top: 0px;
}

.address-book-list dt {
  color: #666;
  height: 0.7rem;
  line-height: 0.7rem;
  text-indent: .2rem;
  background-color: #f7f7f7;
  position: relative;
  padding-left: 10px;
  font-size: 12px;
}

.address-book-list dd {
  margin-top: 10px;
  padding-bottom: 10px;
  margin-left: 10px;
}

.address-book-list dd.hot {
  padding-bottom: .25rem;
}

.address-book-list dd.hot a {
  height: 27.5px;
  width: 33.3%;
  float: left;
  border-bottom: none;
  text-align: center;
  height: inherit;
  line-height: inherit;
}

.address-book-list dd a {
  display: block;
  height: 27.5px;
  line-height: 2.75rem;
  position: relative;
  line-height: 27.5px;
}

.address-book-list dd a img {
  float: left;
  height: 27.5px;
  width: 27.5px;
  margin-right: 5%;
}

.address-book-list dd.hot a span {
  display: block;
  padding-bottom: .25rem;
}

.address-book-list dd.hot a img {
  float: none;
  margin: .25rem auto 0;
}

.address-book-list dd.hot a {
  width: 33.3%;
  float: left;
  border-bottom: none;
  text-align: center;
  height: inherit;
  line-height: inherit;
}

.menu_container {
  position: absolute;
  background: #fff;
  z-index: 2;
  margin-top: -0.4rem;
}

.menu_container::before {
  content: "";
  width: 0;
  height: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
  border-width: 10px;
  border-style: solid dashed dashed dashed;
  border-color: transparent transparent #fff transparent;
  position: absolute;
  top: -20px;
  right: 0px;
}